// -----------------------------------------------
// Author:     code34 nicolas_boiteux@yahoo.fr
// Edited by:  Neumatic
// Warcontext: Set skill of AI
// -----------------------------------------------
if (!isServer) exitWith {};

private ["_unit","_level","_skill"];

_unit 	= _this select 0;
_level 	= _this select 1; 

_skill = [
	"aimingAccuracy",
	"aimingShake",
	"aimingSpeed",
	"endurance",
	"spotDistance",
	"spotTime",
	"courage",
	"reloadSpeed",
	"commanding",
	"general"
];

_unit setSkill _level;

{
	_unit setSkill [_x, _level];
	sleep 0.05;
} foreach _skill;